<template>
  <Card
    title="职位信息"
  >
    <a-descriptions>
      <a-descriptions-item label="职位">{{ user.position.toString() }}</a-descriptions-item>
      <a-descriptions-item label="权限组">{{ user.group | groupsFilter }}</a-descriptions-item>
      <a-descriptions-item label="角色">{{ user.role.toString() }}</a-descriptions-item>
      <!-- <a-descriptions-item label="工号">{{ user.work_number }}</a-descriptions-item> -->
      <!-- <a-descriptions-item label="部门">{{ user.department_name }}</a-descriptions-item> -->
      <!-- <a-descriptions-item label="职级">{{ user.level }}</a-descriptions-item>： -->
      <!-- <a-descriptions-item label="身份">{{ user.department_identity }}</a-descriptions-item>
      <a-descriptions-item label="权限组">{{ user.group.toString() }}</a-descriptions-item>：
      <a-descriptions-item label="角色">{{ user.role.toString() }}</a-descriptions-item>
      <a-descriptions-item label="备注">{{ user.desc }}</a-descriptions-item> -->
    </a-descriptions>
  </Card>
</template>

<script>
import { Card } from '@/components'
import props from './props'

export default {
  mixins: [props],

  filters: {
    groupsFilter (group) {
      const names = group.map((item) => item.full_name)

      return names.toString()
    },
  },

  components: {
    Card,
  },
}
</script>

<style lang="scss" scoped>
</style>
